package deibay.client.gui;

import java.awt.Color;
import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;

public class ListItemsRenderer  implements ListCellRenderer{

	private JLabel label = null;
	
	public ListItemsRenderer()
	{
		this.label = new JLabel();
	}
	
	public Component getListCellRendererComponent(JList arg0, Object value, int arg2, boolean arg3, boolean arg4) {	
		label.setBackground(Color.BLUE);
		label.setForeground(Color.BLACK);
		label.setText(((ItemObjectIcon)value).getItemName());			
		label.setIcon(((ItemObjectIcon)value).getIcon());						
		return label;
	}

}
